package com.systemdevelopment.mainproject.View;
import com.jfoenix.controls.JFXButton;
        import com.jfoenix.controls.JFXDrawer;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
        import javafx.scene.layout.BorderPane;
        import javafx.scene.layout.Pane;
import javafx.scene.input.MouseEvent;

public class mainPaneController extends oneInstanceController {

    @FXML
    private JFXButton drawerButton;

    @FXML
    private JFXButton backButton;
    @FXML
    private BorderPane topPane;

    @FXML
    private JFXDrawer sideMenu;

    @FXML
    private Pane contentPane;

    @FXML
    public void callDrawer(ActionEvent event) {//打开抽屉
        if(!sideMenu.isOpened())
        {
            sideMenu.setMouseTransparent(false);
            sideMenu.open();
        }
    }
    @FXML
    public void closeDrawer(MouseEvent event){//关闭抽屉
        sideMenu.setMouseTransparent(true);
        if(sideMenu.isOpened())
        {
            sideMenu.setMouseTransparent(true);
            sideMenu.close();
        }
    }

    @FXML
    public void gotoBackPane(){
        mainUI.loadBackPane();
    }
}

